<template>
	<view class="f28r col313131">
		<navbar background="background-image: linear-gradient(to right, #2c6739, #99c043);"
			title="推广订单" back @onBack="goBack" @topTotalHeight="topTotalHeight"
		></navbar>
		<view class="disFlex teAliCenter lh90r backColWhite">
			<view :class="['flex1', 'poRel', timeStatus == 0 ? 'col99c043 foWeiBold' : ''
				]" @click="timeSwitch(0)"
			>
				今日订单
				<text class="poAbs left50P trTrXn50P bom0 backCol99c043 h6r w50r"
					v-show="timeStatus == 0"
				></text>
			</view>
			<view :class="['flex1', 'poRel', timeStatus == 1 ? 'col99c043 foWeiBold' : ''
				]" @click="timeSwitch(1)"
			>
				全部订单
				<text class="poAbs left50P trTrXn50P bom0 backCol99c043 h6r w50r"
					v-show="timeStatus == 1"
				></text>
			</view>
		</view>
		<swiper @change="swiperChaFun" :current="timeStatus"
			:style="'min-height: ' + 'calc(100vh - ' + calcNum + 'px);'"
		>
			<swiper-item class="overFYScroll">
				今日订单
				<view class="lh100r col999 teAliCenter f24r">
					暂无数据
				</view>
				<!-- <view class="lh100r col999 teAliCenter f24r">
					到底了
				</view> -->
			</swiper-item>
			<swiper-item class="overFYScroll">
				全部订单
				<view class="lh100r col999 teAliCenter f24r">
					暂无数据
				</view>
				<!-- <view class="lh100r col999 teAliCenter f24r">
					到底了
				</view> -->
			</swiper-item>
		</swiper>
	</view>
</template>
<script>
import navbar from '@/components/navbar.vue'
export default {
	components: { navbar },
	data() {
		return {
			calcNum: 0,
			timeStatus: 0,
		}
	},
	onLoad() {
	
	},
	methods: {
		goBack() {
			uni.navigateBack()
		},
		topTotalHeight(height) {
			// #ifdef MP-WEIXIN
				this.calcNum = height + 45;
			// #endif
			// #ifdef H5
				this.calcNum = 45;
			// #endif
		},
		timeSwitch(type) {
			if(this.timeStatus != type) {
				this.timeStatus = type;
			}
		},
		swiperChaFun(eee) {
			if (eee.detail.source == 'touch') {
				this.timeStatus = eee.detail.current;
			}
		},
	}
}
</script>
<style>
</style>